package tgc.edu.xzy.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.xzy.custom.CommonService;
import tgc.edu.xzy.entity.Grade;
import tgc.edu.xzy.repository.GradeRepository;

@Service
public class GradeService extends CommonService<Grade, Integer>{
	@Autowired
	private GradeRepository gradeDao;

	public List<Grade> findByStudentTbClassId(Integer xsid) {
		return gradeDao.findByStudentTbClassId(xsid);
	}

	public Grade findByStudentIdAndCourseId(Integer xs_id, Integer kc_id) {
		return gradeDao.findByStudentIdAndCourseId(xs_id,kc_id);
	}

	public List<Grade> findByStudentId(Integer id) {
		return gradeDao.findByStudentId(id);
	}
	
	
}
